#include <iostream>
using namespace std;

int main() {

	string str;
	cin>>str;
	int nPos=1;
	int nSum=0;
	for(int i=0;i<static_cast<int>(str.size())-1;++i){
		if(str[i]=='-'){
			continue;
		}	
		int num=str[i]-'0';
		num*=nPos++;
		nSum=(nSum+num)%11;
	}
	char cRight=nSum==10?'X':nSum+'0';
	if(str.back()==cRight){
		cout<<"Right"<<endl;
	}
	else{
		str.back()=cRight;
		cout<<str<<endl;
	}
	
	return 0;
}
